Electro-hydraulic varifocal lens-based method for tracking three-dimensional trajectory of moving object

ABSTRACT

The present disclosure discloses an electro-hydraulic varifocal lens-based method for tracking a 3D trajectory of a moving object. The method includes the following steps of: (1) obtaining a functional relation between a focusing control current and camera&#39;s intrinsic parameters; (2) obtaining a functional relation between focusing control currents of the electro-hydraulic varifocal lens and an optimal object distance; (3) initializing an object tracking algorithm, and taking an object tracking box as a subsequent focusing window; (4) carrying out first autofocusing, recording a focusing control current value after the autofocusing is completed, as well as a size and center point coordinates of the object tracking box; (5) calculating and recording coordinates of the object in 3D space; and (6) repeating steps (4) and (5) for the same object, and sequentially connecting the recorded coordinates of the object in 3D space into a trajectory.

CROSS REFERENCE TO RELATED APPLICATION

This patent application claims the benefit and priority of ChinesePatent Application No. 202111176063.9, filed on Oct. 9, 2021, whichclaims the benefit and priority of Chinese Patent Application No.202111009365.7, filed on Aug. 30, 2021, the disclosure of which isincorporated by reference herein in its entirety as part of the presentapplication.

TECHNICAL FIELD

The present disclosure belongs to the field of computer vision, andrelates to the technical field of methods for moving object tracking, inparticular to an electro-hydraulic varifocal lens-based method fortracking a three-dimensional (3D) trajectory of a moving object.

BACKGROUND ART

Visual object tracking is not only one of the basic visual functions forhuman beings, but also a fundamental and important research topic in thefield of computer vision, which has received constant attention frommultidisciplinary researchers, including researchers on neuroscience andcomputer science. However, most of the current visual object trackingmethods focus on tracking on a two-dimensional image plane, but less onthree-dimensional trajectory tracking. Tracking an object simply on atwo-dimensional plane may greatly limit the application scenarios ofobject tracking technique.

At present, 3D trajectory tracking for a visual object is mainlyachieved by stereoscopic vision methods, which recover depth informationlost during the process of camera projection through devices such as abinocular camera or multiple cameras, depth cameras and laser radars.These methods, however, have the disadvantages of complex structure andhigh equipment cost. In addition, depth cameras and laser radars arealso limited by their small range, making it impossible to track anobject from a distance.

SUMMARY

An objective of the present disclosure is to provide anelectro-hydraulic varifocal lens-based method for tracking athree-dimensional (3D) trajectory of a moving object.

To achieve the aforementioned objective, the present disclosure adoptsthe following technical solution:

an electro-hydraulic varifocal lens-based method for tracking a 3Dtrajectory of a moving object, including:

step 1, calibrating the electro-hydraulic varifocal lens under differentfocal distances to obtain a functional relation between a focusingcontrol current and camera's intrinsic parameters;

step 2, establishing an electro-hydraulic varifocal lens-based opticalimaging system model to obtain a functional relation between a focusingcontrol current of the electro-hydraulic varifocal lens and an optimalobject distance;

step 3, initializing an object tracking algorithm, generating an objecttracking box, and selecting a to-be-tracked object, where the objecttracking box is taken as a subsequent focusing window;

step 4, carrying out first autofocusing to make a sharpness evaluationvalue in the object tracking box of an image greater than a presetthreshold K, and recording a focusing control current I_(i) after theautofocusing is completed, as well as a size size_(i) of the objecttracking box in the image and center point coordinates (x_(i), y_(i)) ofthe object tracking box after undistortion;

step 5, substituting intrinsic parameters (f_(xi), f_(yi), c_(x), c_(y),s and distortion parameters) and an optimal object distance u_(i)corresponding to the focusing control current value I_(i), and thecenter point coordinates (x_(i), y₁) of the object tracking box afterundistortion into a camera projection model, and calculating andrecording coordinates (X_(i), Y_(i), Z_(i)) of the object in 3D space;

step 6, repeating steps 4-5 for the same tracked object, andsequentially connecting the recorded coordinates of the object in 3Dspace into a trajectory (equivalent to a 3D trajectory of the trackedmoving object).

Further, step 1 specifically includes calibrating the electro-hydraulicvarifocal lens under multiple focusing control currents to obtain thefunctional relation between the focusing control current and thecamera's intrinsic parameters by curve fitting:

(f _(x) ,f _(y))=H(I)  (1)

where f_(x) and f_(y) denote parameters in the camera's intrinsicparameters that change with the focal distance, and are physicallydefined as equivalent focal distances of a camera in x and y directionsof a pixel plane respectively, in a unit of px; and I denotes a focusingcontrol current of an electro-hydraulic varifocal lens; and

obtaining camera's intrinsic parameters c_(x), c_(y), s and distortionparameters (the quantity of the distortion parameters depends on thecalibration method used) that do not change with the focal distance,where c_(x) and c_(y) are physically defined as the coordinates of acamera's optical center on the pixel plane, and s is physically definedas a slant parameter between the horizontal and vertical edges of acamera's photosensitive element, all of which are constants obtainablein calibration.

Further, said establishing a functional relation between a focusingcontrol current of the electro-hydraulic varifocal lens and an optimalobject distance in step 2 specifically includes:

recording an optimal object distance under multiple focusing controlcurrents by using the electro-hydraulic varifocal lens-based opticalimaging system model obtained via modeling, and conducting curve fittingon the recorded data to obtain a functional relation between thefocusing control currents of the electro-hydraulic varifocal lens andthe optimal object distance:

u=F(I)  (2)

where u denotes an optimal object distance, and I denotes a focusingcontrol current of the electro-hydraulic varifocal lens.

Further, the autofocusing in step 4 includes first autofocusing andsubsequent autofocusing, and the first autofocusing specificallyincludes: (1) searching an initial focusing control current(corresponding to a shortest or longest focal distance) at a certainstride t, calculating a sharpness evaluation value for an internal imageregion of the object tracking box, obtaining a maximum sharpnessevaluation value D_(max) and a focusing control current I₁ correspondingto the maximum sharpness evaluation value, and setting a sharpnessevaluation threshold:

K=αD _(max)  (3)

where α denotes a preset sharpness confidence level (α<1); and K denotesa preset sharpness evaluation threshold used in the subsequentautofocusing; and

(2) after autofocusing is finished, recording a size size₁ of the objecttracking box in an image and center point coordinates (x₁, y₁) of theobject tracking box after undistortion.

The subsequent autofocusing specifically includes: calculating asharpness evaluation value D_(i) of the internal image region of theobject tracking box; and if D_(i)≥K, directly recording the focusingcontrol current I_(i) at this moment, as well as a size size_(i) of theobject tracking box in an image and center point coordinates (x_(i),y_(i)) of the object tracking box after undistortion; or if D_(i)<K,reading a size size_(i) of the object tracking box in the image at thismoment, comparing the size with a size size_(i-1) of the object trackingbox at last successful focusing (that is, D_(i)≥K) ifsize_(i)<size_(i-1), searching the focusing control current at a certainstride t in the direction where the optimal object distance becomeslonger, calculating a sharpness evaluation value in the object trackingbox, and completing focusing after the sharpness evaluation value isgreater than or equal to the threshold K; or if size_(i)>size_(i-1),searching the focusing control current at a certain stride t in thedirection where the optimal object distance becomes shorter, calculatinga sharpness evaluation value in the object tracking box, and completingfocusing after the sharpness evaluation value is greater than or equalto the threshold K; and after the focusing is completed, recording thesearched focusing control current I_(i) and the size size_(i) of theobject tracking box in the image after focusing and center pointcoordinates (x_(i), y_(i)) of the object tracking box afterundistortion.

Further, the undistortion in step 4 specifically includes: calculating,by a distortion model used in the selected calibration method, anundistorted image of a current frame, and reading and recording centerpoint coordinates (x_(i), y_(i)) of the object tracking box in the imageafter undistortion (namely, undistorted image).

Further, the camera projection model in step 5 is as follows:

$\begin{matrix}{\begin{pmatrix}x_{i} \\y_{i} \\1\end{pmatrix} = {\frac{1}{Z_{i}}\begin{pmatrix}f_{xi} & s & c_{x} \\0 & f_{yi} & c_{y} \\0 & 0 & 1\end{pmatrix}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}} & (4)\end{matrix}$

where (x_(i), y_(i)) denote center point coordinates after undistortion,c_(x), c_(y), and s are camera's intrinsic parameters obtained duringcalibration and do not vary with the focal distance, f_(xi), f_(yi),denote equivalent focal distances of the camera in the x and ydirections obtained by substituting a focusing control current I_(i) atthis moment into the calibration formula (1), and (X_(i), Y_(i), Z_(i))denote 3D coordinates of a center point of the tracked object; the 3Dcoordinates (X_(i), Y_(i), Z_(i)) of the center point of the trackedobject can be calculated by substituting center point coordinates(x_(i), y_(i)) of the object tracking box after undistortion obtained instep 4, the camera's intrinsic parameters obtained during calibrationand Z_(i)=u_(i) into the above camera projection model; and u_(i)denotes an optimal object distance obtained by substituting a focusingcontrol current I_(i) at this moment into formula (2).

Further, the sharpness evaluation value is calculated using a Laplacianfunction, and the Laplacian function is expressed as:

$\begin{matrix}{{D(f)} = {\sum_{y}{\sum_{x}{❘{G\left( {x,y} \right)}❘}}}} & (5)\end{matrix}$

where G(x, y) denotes convolution of a Laplacian operator at a pixelpoint (x, y), and the Laplacian operator is expressed as:

$\begin{matrix}{L = {{\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {- 20} & 4 \\1 & 4 & 1\end{bmatrix}}.}} & (6)\end{matrix}$

The present disclosure has the following beneficial effects over theprior art:

In the present disclosure, the electro-hydraulic varifocal lens is used,which has the advantages of fast focusing response speed, low energyconsumption, compact structure, high repeated positioning accuracy, andfast and accurate focusing; by modeling the optical imaging system ofthe lens, the function relation between the focal distance of theelectro-hydraulic varifocal lens and the optical imaging object distancecan be obtained by modeling the optical imaging system of the lensaccording to the correlation among the control current of the lens, thefocal distance and the optical imaging object distance; and when theobject is in focus after autofocusing, the depth information of theobject can be obtained by using this functional relation. The presentdisclosure provides a new method for tracking a 3D trajectory of anobject. The electro-hydraulic varifocal lens keeps the object to be infocus, and the optimal object distance is taken as the depth of theobject relative to the camera. In this way, the depth information lostin the process of projecting the object to a camera imaging plane can berecovered, and the 3D trajectory of the object can thus be tracked withsimple structure and relatively low cost.

The present disclosure does not require stereo vision equipment withcomplex structure and large size, and can track the 3D trajectory of theobject simply using a single camera, which is less costly. According tothe present disclosure, the 3D trajectory of the object can be tracked,in the meanwhile, the tracked object can be kept in focus in the imagethrough autofocusing, which improves the stability of the objecttracking algorithm used, marking a significant progress compared withthe prior art.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart according to Embodiment 1 of the presentdisclosure.

DETAILED DESCRIPTION OF THE EMBODIMENTS Embodiment 1

The present disclosure provides an electro-hydraulic varifocallens-based method for tracking a three-dimensional (3D) trajectory of amoving object, including:

step 1, calibrate, based on Zhang Zhengyou Calibration Method, theelectro-hydraulic varifocal lens under different focal distances toobtain a functional relation between a focusing control current andcamera's intrinsic parameters;

step 1 specifically includes calibrating the electro-hydraulic varifocallens under multiple focusing control currents to obtain correspondingf_(x), f_(y), and obtaining a functional relation between a focusingcontrol current and camera's intrinsic parameters by curve fitting:

(f _(x) ,f _(y))=H(I)  (1)

where f_(x) and f_(y) denote parameters in the camera's intrinsicparameters that change with the focal distance, and as physicallydefined as equivalent focal distances of a camera in x and Y directionsof a pixel plane, in a unit of px; and I denotes a focusing controlcurrent of an electro-hydraulic varifocal lens.

In the meanwhile, obtain camera's intrinsic parameters c_(x), c_(y), sand distortion parameters k₁, k₂ (only radial distortion is consideredin the Zhang Zhengyou Calibration Method) that do not change with thefocal distance, where c_(x) and c_(y) are physically defined as thecoordinates of a camera's optical center on the pixel plane, and s isphysically defined as a slant parameter between the horizontal andvertical edges of a camera's photosensitive element, all of which areconstants obtainable in calibration.

step 2, establish, by Zemax software, an electro-hydraulic varifocallens-based optical imaging system model, and set the radius, thickness,curvature, material and other parameters of the electro-hydraulicvarifocal lens used in Zemax software, so as to obtain a functionalrelation between a focusing control current of the electro-hydraulicvarifocal lens and an optimal object distance;

step 2 specifically includes recording an optimal object distance undermultiple focusing control currents by using the electro-hydraulicvarifocal lens-based optical imaging system model constructed by theZemax software, and conducting curve fitting on the recorded data toobtain a functional relation between focusing control currents of theelectro-hydraulic varifocal lens and the optimal object distance:

u=F(I)  (2)

where u denotes an optimal object distance, and I denotes a focusingcontrol current of the electro-hydraulic varifocal lens.

step 3, initialize an object tracking algorithm, and select ato-be-tracked object, where the object tracking box is taken as asubsequent focusing window; generally, the object tracking algorithm canbe divided into: first, correlation filtering methods, such as CSK,KCF/DCF, CN, etc.; second, depth learning methods, such as C-COT, ECOand DLT; both methods can be selected in the present disclosure, and theKCF algorithm is selected in the present embodiment.

step 4, carry out first autofocusing to make a sharpness evaluationvalue in an object tracking box in an image greater than a presetthreshold K, and record a focusing control current I_(i) after theautofocusing is completed, as well as a size size_(i) of the objecttracking box in the image and center point coordinates (x_(i), y_(i)) ofthe object tracking box after undistortion;

the autofocusing includes first autofocusing and subsequentautofocusing, and the first autofocusing specifically includes: (1)searching an initial focusing control current (focusing control currentcorresponding to a shortest or longest focal distance) at a certainstride t=(b−a)/1000, where a denotes a minimum focusing control current,and b denotes a maximum focusing control current; and calculating asharpness evaluation value for an internal image region of the objecttracking box, obtaining a maximum sharpness evaluation value D_(max) anda focusing control current I₁ corresponding to the maximum sharpnessevaluation value, and setting a sharpness evaluation threshold:

K=αD _(max)  (3)

where α denotes a preset sharpness confidence level (α<1); and K denotesa preset sharpness evaluation threshold used in the subsequentautofocusing.

The sharpness evaluation value is calculated by the sharpness evaluationfunction, and the sharpness evaluation function can be commonly used SMDfunction, EOG function, Roberts function, Tenengrad function, Brennerfunction, Laplacian function or SML function. For ease of understanding,the Laplacian function is selected for calculation in this embodiment,which is expressed as:

D(f)=Σ_(y)Σ_(x) |G(x,y)|  (5)

where G(x, y) denotes convolution of a Laplacian operator at a pixelpoint (x, y), and the Laplacian operator is expressed as:

$\begin{matrix}{L = {\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}} & (6)\end{matrix}$

(2) after autofocusing is finished, record a size size₁ of the objecttracking box in an image and center point coordinates (x₁, y₁) afterundistortion (namely, center point coordinates of the object trackingbox in an undistorted image).

The subsequent autofocusing specifically includes: calculating asharpness evaluation value D_(i) of the internal image region of theobject tracking box; and if D_(i)≥K, directly recording the focusingcontrol current I_(i) at this moment, as well as a size size_(i) of theobject tracking box in an image and center point coordinates (x_(i),y_(i)) of the object tracking box after undistortion; or if D_(i)<K,reading a size size_(i) of the object tracking box in the image at thismoment, comparing the size with a size size_(i-1) of the object trackingbox at last successful focusing; if size_(i)<size_(i-1), searching thefocusing control current at a certain stride t in the direction wherethe optimal object distance becomes longer, calculating a sharpnessevaluation value in the object tracking box, and completing focusingafter the sharpness evaluation value is greater than or equal to thesharpness evaluation threshold; or if size_(i)>size_(i-1), searching thefocusing control current at a certain stride tin the direction where theoptimal object distance becomes shorter, calculating a sharpnessevaluation value in the object tracking box, and completing focusingafter the sharpness evaluation value is greater than or equal to thesharpness evaluation threshold; and after the focusing is completed,recording the searched focusing control current I_(i) and the sizesize_(i) of the object tracking box in the image after focusing andcenter point coordinates (x_(i), y_(i)) after undistortion.

The undistortion specifically includes: calculating, by a distortionmodel used in the selected calibration method, an undistorted image of acurrent frame and reading and recording center point coordinates (x_(i),y_(i)) of the object tracking box in the undistorted image.

The radial distortion model used in the Zhang Zhengyou CalibrationMethod is:

x _(distorted) =x(1+k ₁ r ² +k ₂ r ⁴)  (7)

y _(distorted) =y(1+k ₁ r ² +k ₂ r ⁴)  (8)

r=√{square root over (x ² +y ²)}  (9)

where x_(distorted), y_(distorted) denote pixel coordinates afterdistortion of an image, x and y are ideal pixel coordinates forundistortion, and k₁, k₂: denote distortion parameters obtained bycalibration. Calculate, by the above distortion model, an undistortedimage of a current frame, and read and record center point coordinates(x_(i), y_(i)) of the object tracking box in the image afterundistortion.

step 5, substitute a focusing control current value I_(i), correspondingintrinsic parameters f_(xi), f_(yi), c_(x), c_(y), s, distortionparameters k₁ and k₂, and an optimal object distance u and the centerpoint coordinates (x_(i), y_(i)) of the object tracking box afterundistortion into a camera projection model, and calculate and recordcoordinates (X_(i), Y_(i), Z_(i)) of the object in 3D space; where thecamera projection model is:

$\begin{matrix}{\begin{pmatrix}x_{i} \\y_{i} \\1\end{pmatrix} = {\frac{1}{Z_{i}}\begin{pmatrix}f_{xi} & s & c_{x} \\0 & f_{yi} & c_{y} \\0 & 0 & 1\end{pmatrix}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}} & (4)\end{matrix}$

where (x_(i), y_(i)) denote center point coordinates after undistortion,c_(x), c_(y), and s are camera's intrinsic parameters obtained duringcalibration and do not vary with the focal distance, f_(xi), f_(yi),denote equivalent focal distances of the camera in the x and ydirections obtained by substituting a focusing control current I_(ti) atthis moment into the calibration formula (1), and (X_(i), Y_(i), Z_(i))denote 3D coordinates of a center point of the tracked object; and the3D coordinates (X_(i), Y_(i), Z_(i)) of the center point of the trackedobject can be calculated by substituting center point coordinates(x_(i), y_(i)) of the object tracking box after undistortion obtained instep 4, the camera's intrinsic parameters obtained during calibrationand Z_(i)=u_(i) (u_(i) denotes an optimal object distance bysubstituting the focusing control current I_(i) at this moment intoformula (2)) into the above camera projection model;

step 6, repeat steps 4-5 for the same tracked object, and sequentiallyconnect the recorded coordinates of the object in 3D space into atrajectory (equivalent to a 3D trajectory of the tracked moving object).

The present disclosure does not require stereo vision equipment withcomplex structure and large size, and can track the 3D trajectory of theobject simply using a single camera, which is less costly. According tothe present disclosure, the 3D trajectory of the object can be tracked,in the meanwhile, the tracked object can be kept in focus in the imagethrough autofocusing, which improves the stability of the objecttracking algorithm used, marking a significant progress compared withthe prior art.

Embodiment 2

Compared with Embodiment 1, step 4 in this embodiment includes: directlycalling an undistortion function of OpenCV, introducing distortionparameters k₁, k₂: obtained through calibration, conducting undistortingon an image, calculating an undistorted image of a current frame, andreading and recording center point coordinates (x_(i), y_(i)) of anobject tracking box in the image after undistortion.

1. An electro-hydraulic varifocal lens-based method for tracking athree-dimensional (3D) trajectory of a moving object, comprising: step1, calibrating the electro-hydraulic varifocal lens under differentfocal distances to obtain a functional relation between a focusingcontrol current and camera's intrinsic parameters; step 2, establishingan electro-hydraulic varifocal lens-based optical imaging system modelto obtain a functional relation between a focusing control current ofthe electro-hydraulic varifocal lens and an optimal object distance;step 3, initializing an object tracking algorithm, generating an objecttracking box, and selecting a to-be-tracked object; step 4, carrying outautofocusing, and recording a focusing control current after theautofocusing is completed, as well as a size of the object tracking boxin an image and center point coordinates after undistortion; step 5,calculating, by a camera projection model, coordinates of the object in3D space and recording the same; and step 6, repeating steps 4-5 for thesame tracked object, and sequentially connecting the recordedcoordinates of the object in 3D space into a trajectory.
 2. Theelectro-hydraulic varifocal lens-based method for tracking a 3Dtrajectory of a moving object according to claim 1, wherein step 1specifically comprises calibrating the electro-hydraulic varifocal lensunder multiple focusing control currents to obtain the functionalrelation between the focusing control current and the camera's intrinsicparameters by curve fitting:(f _(x) ,f _(y))=H(I)  (1) wherein f_(x) and f_(y) denote equivalentfocal distances of a camera in x and y directions of a pixel planerespectively, in a unit of px; and I denotes a focusing control currentof an electro-hydraulic varifocal lens; and obtaining coordinates of acamera's optical center on the pixel plane, and a slant parameterbetween horizontal and vertical edges of a camera's photosensitiveelement.
 3. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 2,wherein step 2 specifically comprises recording an optimal objectdistance under multiple focusing control currents by using theelectro-hydraulic varifocal lens-based optical imaging system model, andconducting curve fitting on the recorded data to obtain a functionalrelation between focusing control currents of the electro-hydraulicvarifocal lens and the optimal object distance:u=F(I)  (2) wherein u denotes an optimal object distance, and I denotesa focusing control current of the electro-hydraulic varifocal lens. 4.The electro-hydraulic varifocal lens-based method for tracking a 3Dtrajectory of a moving object according to claim 3, wherein theautofocusing in step 4 comprises first autofocusing and subsequentautofocusing, and the first autofocusing specifically comprises: (1)searching an initial focusing control current at a certain stride,calculating a sharpness evaluation value of an internal image region ofthe object tracking box, obtaining a maximum sharpness evaluation valueand a focusing control current corresponding to the maximum sharpnessevaluation value, and setting a sharpness evaluation threshold:K=αD _(max)  (3) wherein α denotes a preset sharpness confidence level,and α<1; K denotes a sharpness evaluation threshold used in thesubsequent autofocusing; and D_(max) denotes a maximum sharpnessevaluation value; and (2) after autofocusing is finished, recording asize of the object tracking box in an image and center point coordinatesafter undistortion.
 5. The electro-hydraulic varifocal lens-based methodfor tracking a 3D trajectory of a moving object according to claim 4,wherein the subsequent autofocusing specifically comprises: calculatinga sharpness evaluation value D_(i) of the internal image region of theobject tracking box; and if D_(i)≥K, directly recording the focusingcontrol current I_(i) at this moment, as well as a size size_(i) of theobject tracking box in an image and center point coordinates afterundistortion; or if D_(i)<K, reading a size size_(i) of the objecttracking box in the image at this moment, comparing the size with a sizesize_(i-1) of the object tracking box at last successful focusing, andadjusting a focusing control current to complete focusing; and after thefocusing is completed, recording the focusing control current and thesize of the object tracking box in the image after focusing and centerpoint coordinates after undistortion.
 6. The electro-hydraulic varifocallens-based method for tracking a 3D trajectory of a moving objectaccording to claim 5, wherein when D_(i)<K, the focusing control currentis adjusted based on a comparison result of size, and size_(i-1), whichspecifically comprises: if size_(i)<size_(i-1), searching the focusingcontrol current at a certain stride in the direction where the optimalobject distance becomes longer, calculating a sharpness evaluation valuein the object tracking box, and completing focusing after the sharpnessevaluation value is greater than or equal to the sharpness evaluationthreshold; or if size_(i)>size_(i-1), searching the focusing controlcurrent at a certain stride in the direction where the optimal objectdistance becomes shorter, calculating a sharpness evaluation value inthe object tracking box, and completing focusing after the sharpnessevaluation value is greater than or equal to the sharpness evaluationthreshold.
 7. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 6,wherein the undistortion in step 4 specifically comprises: calculatingan undistorted image of a current frame according to a distortion model,and reading and recording center point coordinates of the objecttracking box in the undistorted image.
 8. The electro-hydraulicvarifocal lens-based method for tracking a 3D trajectory of a movingobject according to claim 5, wherein the camera projection model in step5 is: $\begin{matrix}{\begin{pmatrix}x_{i} \\y_{i} \\1\end{pmatrix} = {\frac{1}{Z_{i}}\begin{pmatrix}f_{xi} & s & c_{x} \\0 & f_{yi} & c_{y} \\0 & 0 & 1\end{pmatrix}\begin{pmatrix}X_{i} \\Y_{i} \\Z_{i}\end{pmatrix}}} & (4)\end{matrix}$ wherein (x_(i), y_(i)) denote center point coordinates ofan object tracking box in an undistorted image, c_(x) and c_(y) denotecoordinates of a camera's optical center on the pixel plane, s denotes aslant parameter between horizontal and vertical edges of a camera'sphotosensitive element, f_(xi), f_(yi), denote equivalent focaldistances of a camera in x and y directions corresponding to a focusingcontrol current I_(i) at this moment respectively, and (X_(i), Y_(i),Z_(i)) denote 3D coordinates of a center point of a tracked object; andZ_(i)=u_(i), wherein u_(i) denotes an optimal object distancecorresponding to the focusing control current I_(i) at this moment. 9.The electro-hydraulic varifocal lens-based method for tracking a 3Dtrajectory of a moving object according to claim 4, wherein thesharpness evaluation value is calculated using a Laplacian function, andthe Laplacian function is expressed as: $\begin{matrix}{{D(f)} = {\sum_{y}{\sum_{x}{❘{G\left( {x,y} \right)}❘}}}} & (5)\end{matrix}$ wherein G(x, y) denotes convolution of a Laplacianoperator at a pixel point (x, y), and the Laplacian operator isexpressed as: $\begin{matrix}{{L = {\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}}.} & (6)\end{matrix}$
 10. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 5,wherein the sharpness evaluation value is calculated using a Laplacianfunction, and the Laplacian function is expressed as: $\begin{matrix}{{D(f)} = {\sum_{y}{\sum_{x}{❘{G\left( {x,y} \right)}❘}}}} & (5)\end{matrix}$ wherein G(x, y) denotes convolution of a Laplacianoperator at a pixel point (x, y), and the Laplacian operator isexpressed as: $\begin{matrix}{{L = {\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}}.} & (6)\end{matrix}$
 11. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 6,wherein the sharpness evaluation value is calculated using a Laplacianfunction, and the Laplacian function is expressed as:D(f)=Σ_(y)Σ_(x) |G(x,y)|  (5) wherein G(x, y) denotes convolution of aLaplacian operator at a pixel point (x, y), and the Laplacian operatoris expressed as: $\begin{matrix}{{L = {\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}}.} & (6)\end{matrix}$
 12. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 7,wherein the sharpness evaluation value is calculated using a Laplacianfunction, and the Laplacian function is expressed as:D(f)=Σ_(y)Σ_(x) |G(x,y)|  (5) wherein G(x, y) denotes convolution of aLaplacian operator at a pixel point (x, y), and the Laplacian operatoris expressed as: $\begin{matrix}{L = {{\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}.}} & (6)\end{matrix}$
 13. The electro-hydraulic varifocal lens-based method fortracking a 3D trajectory of a moving object according to claim 8,wherein the sharpness evaluation value is calculated using a Laplacianfunction, and the Laplacian function is expressed as:D(f)=Σ_(y)Σ_(x) |G(x,y)|  (5) wherein G(x, y) denotes convolution of aLaplacian operator at a pixel point (x, y), and the Laplacian operatoris expressed as: $\begin{matrix}{{L = {\frac{1}{6}\begin{bmatrix}1 & 4 & 1 \\4 & {{- 2}0} & 4 \\1 & 4 & 1\end{bmatrix}}}.} & (6)\end{matrix}$